// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef WM_SHELL_XDG_APP_LIST_VIEW_DELEGATE_H_
#define WM_SHELL_XDG_APP_LIST_VIEW_DELEGATE_H_

#include "ui/app_list/app_list_model.h"
#include "ui/app_list/app_list_view_delegate.h"

namespace gfx {
class ImageSkia;
}

namespace wm {
namespace shell {

class XdgAppListViewDelegate : public app_list::AppListViewDelegate {
 public:
  XdgAppListViewDelegate();
  virtual ~XdgAppListViewDelegate();

 private:
  void PopulateApps(app_list::AppListModel::Apps* apps);
  gfx::ImageSkia CreateSearchBoxIcon();
  void DecorateSearchBox(app_list::SearchBoxModel* search_box_model);

  // Overridden from ash::AppListViewDelegate:
  virtual void SetModel(app_list::AppListModel* model) OVERRIDE;
  virtual app_list::SigninDelegate* GetSigninDelegate() OVERRIDE;
  virtual void ActivateAppListItem(app_list::AppListItemModel* item,
                                   int event_flags) OVERRIDE;
  virtual void OpenSearchResult(const app_list::SearchResult& result,
                                int event_flags) OVERRIDE;
  virtual void InvokeSearchResultAction(const app_list::SearchResult& result,
                                        int action_index,
                                        int event_flags) OVERRIDE;
  virtual void StartSearch() OVERRIDE;
  virtual void StopSearch() OVERRIDE;
  virtual void Dismiss() OVERRIDE;
  virtual void ViewClosing() OVERRIDE;
  virtual void ViewActivationChanged(bool active) OVERRIDE;
  virtual gfx::ImageSkia GetWindowIcon() OVERRIDE;

  app_list::AppListModel* model_;

  DISALLOW_COPY_AND_ASSIGN(XdgAppListViewDelegate);
};

}  // namespace shell
}  // namespace wm

#endif  // WM_SHELL_XDG_APP_LIST_VIEW_DELEGATE_H_

